package test.library.behavior;

import test.library.Book;
import test.library.BookList;

import java.util.Scanner;

public class ReturnBook implements IBehavior{
    public void work(BookList bookList){
        System.out.println("归还书籍");
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入书籍编号:");
        int num = scanner.nextInt();
        Book book = bookList.getBook(num);
        book.setBorrowed(false);
        System.out.println("已归还");
    }
}
